Skip to content

chore: close the type coverage gaps (stray mutant artefact, contract-bound parameters) - #710

Merged
ogorzalka merged 2 commits into
developfrom
chore/type-coverage-gaps
Nov 25, 2026
Merged

ogorzalka merged 2 commits into
developfrom
chore/type-coverage-gaps

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Base: develop.

What changes

  1. Removes src/Auth/.mutant-98777-WordPressGuard.php, a mutation-testing artefact committed by mistake (a8c2e7a, /api/ light mode loads no plugin by default: a security plugin does not protect /api/ routes #678), and ignores .mutant-* in .gitignore.
  2. Types the declarations that were left bare, in ObjectCacheStore, WordPressHasher, WordPressGuard and PluginListCommand.
    • Parameters of the Illuminate contracts (Store, Hasher, StatefulGuard) are untyped in the contract, so PHP only allows mixed (a narrower type would break parameter contravariance). They are typed mixed; no behaviour change, no @phpstan-ignore.
    • PluginListCommand helpers take and return PluginCollection (own protected methods, not a contract).

Type coverage (static measure, CONV-11): 97.54 % -> 98.14 % (140 -> fewer untyped declarations); the 98 % CI floor is met.

Checked

  • composer qa:fast and composer qa: every gate that ran passed (PHPStan, Pint, Rector, Pest incl. arch, deps, surface, ratchet).
  • Pest filter on Auth / Hasher / ObjectCache / PluginList: 144 passed.

Not verified

  • Semgrep gates (SEC-*, CONV-10): tool absent locally, left to CI.
  • Line coverage / mutation: no report produced locally.
  • type_coverage is NOT recorded in .harness.json on develop (ratchet shows "-"). Protected file, not touched. Maintainer command, from the framework root once merged:
    vendor/bin/pollora-qa ratchet --update --metric=type_coverage:97.9
  • Remaining untyped declarations (e.g. WordPressUserProvider, MakeBindingCommand, MakeModelCommand, AttributeMakeCommand, LaravelModuleDiscovery, 4 each) are out of this PR.

@ogorzalka
ogorzalka merged commit 306e7c7 into develop Nov 25, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant